<template>
  <div class="detail-info" v-if="Object.keys(detailInfo).length">
    <p class="desc">{{ detailInfo.desc }}</p>
    <div class="clear-both detailImage" v-for="(item,index) in detailInfo.detailImage" :key="index">
      <p>{{ item.key }}</p>
      <div v-for="(imager,indey) in item.list" :key="indey">
        <img v-lazy="imager" alt="" @load="detailImgLoad">
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "DetailInfo",
  props: {
    detailInfo: {
      type: Object,
      default() {
        return {};
      }
    },
  },
  methods: {
    detailImgLoad() {
      this.$bus.$emit("detailImgLoad");
    }
  }
}
</script>

<style scoped>
.detail-info {
  padding: 0 0 15px 0;
  border-bottom: 5px solid #f2f5f8;
}

.detail-info .desc {
  font-size: var(--font-size);
  padding: 15px;
}

.detail-info .desc::before {
  content: '';
  display: block;
  margin: 5px 0;
  width: 100px;
  height: 15px;
  border-top: 1px solid #000;
  border-left: 1px solid #000;
}

.detail-info .desc::after {
  content: '';
  display: block;
  margin: 5px 0;
  width: 100px;
  height: 15px;
  border-bottom: 1px solid #000;
  border-right: 1px solid #000;
  float: right;
}

.detailImage p {
  color: #333;
  padding: 0 15px 15px 15px;
}

.detail-info img {
  width: 100%;
}
</style>